package com.lijian.netty.heartbeat4;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.timeout.IdleStateHandler;

/**
 * @author lj02
 * @desc
 * @date 2018/11/26
 */
public class HeartBeatServerInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ch.pipeline()
                .addLast(new IdleStateHandler(5, 7, 9))
                .addLast(new HeartBeatServerChannelHandlerAdapter());
    }
}
